package business.datacenter.impl;

import business.datacenter.CreditPubReportGuaranteeInfoService;
import datacenter.domain.CreditPubReportGuaranteeInfo;
import datacenter.mapper.CreditPubReportGuaranteeInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by SunZZ on 2016/6/22.
 */
@Service(value = "CGuaranteeService")
public class CreditPubReportGuaranteeInfoServiceImpl implements CreditPubReportGuaranteeInfoService {
    @Autowired
    CreditPubReportGuaranteeInfoMapper creditPubReportGuaranteeInfoMapper;

    @Override
    public void saveCreditPubReportGuaranteeInfo(List<CreditPubReportGuaranteeInfo> entities) {
        for(CreditPubReportGuaranteeInfo entity:entities) {
            try {
                creditPubReportGuaranteeInfoMapper.insertSelective(entity);
            }catch (Exception e){
                System.out.print(entity.getCorpid());
                System.out.print(entity.getGuar_name());
                System.out.print(entity.getGuar_date_end());
                System.out.print(entity.getGuar_date_start());
            }
        }
    }
}
